<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:composite="http://java.sun.com/jsf/composite">
<composite:interface>
	<composite:attribute name="usernameLabel" />
	<composite:attribute name="usernameValue" />
	<composite:attribute name="passwordLabel" />
	<composite:attribute name="passwordValue" />
	<composite:attribute name="loginButtonLabel" />
	<composite:attribute name="loginButtonAction"
		method-signature="java.lang.String login()" />
</composite:interface>
<composite:implementation>
	<h:form>
<!-- 		<h:message for="loginPanel" style="color:red;" /> -->
		<p:growl id="growl" showDetail="true" sticky="true" /> 
		<h:panelGrid columns="3" id="loginPanel">
#{cc.attrs.usernameLabel} 
<h:inputText id="username" value="#{cc.attrs.usernameValue}">
	<f:validateLength minimum="5" />
	<p:ajax event="blur" update="usernamee" />
</h:inputText>
 <p:message id="usernamee" for="username" display="icon" />
#{cc.attrs.passwordLabel} 
<h:inputSecret id="password" value="#{cc.attrs.passwordValue}" />
		</h:panelGrid>
		<h:commandButton action="#{cc.attrs.loginButtonAction}"
			value="#{cc.attrs.loginButtonLabel}"  update="growl"/>
	</h:form>
</composite:implementation>
</html>